package com.vcredit.creditcat.api;

import com.vcredit.creditcat.dto.resource.ResourceDto;
import com.vcredit.creditcat.enumtype.ResourceTypeEnum;
import com.vcredit.creditcat.exception.ResourceException;

/**
 * @author chengchao
 *
 */
public interface IResourceManger {

	/**
	 * @param resourceType
	 *            资源类型
	 * @param fileByte
	 *            文件字节流
	 * @param fileName
	 *            原始文件名
	 * @return
	 * @throws ResourceException
	 */
	ResourceDto upload(ResourceTypeEnum resourceType, String fileName, byte[] fileByte) throws ResourceException;

	/**
	 * @param resourceCode
	 *            资源代码
	 * @return
	 * @throws ResourceException
	 */
	ResourceDto download(String resourceCode) throws ResourceException;

}
